#include "sys.h"

void tim1_init()
{
	HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_1);
	HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_2);
	HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_3);
	HAL_TIM_PWM_Start(&htim1,TIM_CHANNEL_4);
}

void m1_pwm(uint16_t Pulse)
{
	__HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_1, Pulse);
}

void m2_pwm(uint16_t Pulse)
{
	__HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_2, Pulse);
}

void m3_pwm(uint16_t Pulse)
{
	__HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_3, Pulse);
}

void m4_pwm(uint16_t Pulse)
{
	__HAL_TIM_SetCompare(&htim1, TIM_CHANNEL_4, Pulse);
}